//
//  MeBizQutoeV.m
//  ZITHER
//
//  Created by weixin on 2018/11/22.
//  Copyright © 2018 weixn. All rights reserved.
//

#import "MeBizQutoeV.h"

@implementation MeBizQutoeV


-(void)setModeTyep1:(MyEnquiryListDataNewModel *)modeTyep1{
    _modeTyep1 = modeTyep1;
    self.MeCheckBizInfo.modeTyep1 = modeTyep1;
//    self.redV.hidden = ![modeTyep1.freshPriceCount isEqualToString:@"0"];
    
    self.receiveNum.text = modeTyep1.priceCount;
    
    self.acceptNum.text = modeTyep1.acceptPriceCount;

    

    
//    @property (nonatomic,strong)MeCheckBizInfo * MeCheckBizInfo;//查看商家
    
    
    
    
    //  判断是否展示商家用户数据
    //    if (modeTyep1.bizInfoList.count !=0) {
    //        //有商家数据
    //        NSString *str = [NSString stringWithFormat:@"%@%@",RootUrlImage,modeTyep1.bizInfoList[0].bizPortrait];
    //
    //        [self.imageBiz sd_setImageWithURL:[NSURL URLWithString:str]];
    //        self.labBizName.text =modeTyep1.bizInfoList[0].bizNickName;
    //
    //        self.labBizTitle.text = [NSString stringWithFormat:@"及%d个已接受报价的商家", [modeTyep1.acceptPriceCount intValue] -1];
    //        //有商家
    //        bizV = YES;
    //    }

    
}








- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.clipsToBounds = YES;

        [self addSubview:self.receiveNum];
        [self addSubview:self.receivePrice];
        [self addSubview:self.acceptNum];
        [self addSubview:self.acceptPrice];
        [self addSubview:self.MeCheckBizInfo];
        [self addSubview:self.redV];
        
    
        
        [self.receiveNum mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(20);
            make.centerY.equalTo(self.mas_centerY).offset(-15);
        }];
        
        [self.receivePrice mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(20);
            make.centerY.equalTo(self.mas_centerY).offset(15);
        }];
        
        [self.acceptNum mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(120);
            make.centerY.equalTo(self.mas_centerY).offset(-15);
        }];
        
        [self.acceptPrice mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(120);
            make.centerY.equalTo(self.mas_centerY).offset(15);
        }];
        
        [self.MeCheckBizInfo mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.mas_right).offset(15);
            make.centerY.equalTo(self.mas_centerY).offset(0);
            make.height.mas_equalTo(44);
            make.width.mas_equalTo(130);
        }];
        
        [self.redV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.receiveNum.mas_right).offset(2);
//            make.bottom.equalTo(self.receiveNum.mas_top).offset(2);
//            make.left.equalTo(self.mas_left).offset(0);
            make.top.equalTo(self.mas_top).offset(2);
            make.width.height.mas_equalTo(6);
        }];
    }
    return self;
}


-(BaseLab *)receiveNum{
    if (!_receiveNum) {
        _receiveNum = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, kScreenW, kScreenH) text:@"1" font:18 textColor:baseColorTheme isBold:NO numberOfLines:0];
        _receiveNum.font = [UIFont fontWithName:@"PingFangSC-Semibold" size:25];

    }
    return _receiveNum;
}


-(BaseLab *)receivePrice{
    if (!_receivePrice) {
        _receivePrice = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, kScreenW, kScreenH) text:@"收到报价" font:18 textColor:[UIColor blackColor] isBold:NO numberOfLines:0];
        _receivePrice.font = [UIFont fontWithName:@"PingFangSC-Medium" size:12];
    }
    return _receivePrice;
}

-(BaseLab *)acceptNum{
    if (!_acceptNum) {
        _acceptNum = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, kScreenW, kScreenH) text:@"2" font:18 textColor:baseColorTheme isBold:NO numberOfLines:0];
        _acceptNum.font = [UIFont fontWithName:@"PingFangSC-Semibold" size:25];
    }
    return _acceptNum;
}


-(BaseLab *)acceptPrice{
    if (!_acceptPrice) {
        _acceptPrice = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, kScreenW, kScreenH) text:@"接受报价" font:18 textColor:[UIColor blackColor] isBold:NO numberOfLines:0];
        _acceptPrice.font = [UIFont fontWithName:@"PingFangSC-Medium" size:12];
    }
    return _acceptPrice;
}




-(MeCheckBizInfo *)MeCheckBizInfo{
    if (!_MeCheckBizInfo) {
        _MeCheckBizInfo = [[MeCheckBizInfo alloc]initWithFrame:CGRectMake(0, 0, 130, 44)];
        [_MeCheckBizInfo setCornerRadiusWithRadius:22 isMasks:YES];
        _MeCheckBizInfo.backgroundColor = [UIColor colorWithHex:@"f5f5f5"];
    }
    return _MeCheckBizInfo;
}

-(BaseView *)redV{
    if (!_redV) {
        _redV = [[BaseView alloc]initWithFrame:CGRectMake(0, 0, 130, 44)];
        [_redV setCornerRadiusWithRadius:3 isMasks:YES];
        _redV.backgroundColor = [UIColor redColor];
        _redV.hidden = YES;
    }
    return _redV;
}





@end
